package com.hui.platform.falseworkapi.service.business.user.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * 用户表
 *
 * @author hui
 * @since 2020-04-14
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("`tb_user`")
public class TbUser implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "`id`", type = IdType.AUTO)
    private Long id;

    /**
     * 用户名
     */
    @TableField("`username`")
    private String username;

    /**
     * 密码，加密存储
     */
    @TableField("`password`")
    private String password;

    /**
     * 昵称
     */
    @TableField("`nick_name`")
    private String nickName;

    /**
     * 性别，1男，2女，3保密
     */
    @TableField("`sex`")
    private String sex;

    /**
     * 生日
     */
    @TableField("`birthday`")
    private Date birthday;

    /**
     * 头像地址
     */
    @TableField("`head_pic`")
    private String headPic;

    /**
     * 注册手机号
     */
    @TableField("`phone`")
    private String phone;

    /**
     * 注册邮箱
     */
    @TableField("`email`")
    private String email;

    /**
     * 创建时间
     */
    @TableField("`created`")
    private Date created;

    /**
     * 最后登录时间
     */
    @TableField("`last_login_time`")
    private Date lastLoginTime;

    /**
     * 是否删除
     */
    @TableField("`deleted`")
    @TableLogic
    private Integer deleted;


    public static final String ID = "`id`";

    public static final String USERNAME = "`username`";

    public static final String PASSWORD = "`password`";

    public static final String NICK_NAME = "`nick_name`";

    public static final String SEX = "`sex`";

    public static final String BIRTHDAY = "`birthday`";

    public static final String HEAD_PIC = "`head_pic`";

    public static final String PHONE = "`phone`";

    public static final String EMAIL = "`email`";

    public static final String CREATED = "`created`";

    public static final String LAST_LOGIN_TIME = "`last_login_time`";

    public static final String DELETED = "`deleted`";

}
